package test;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import dao.UserDao;
import entity.User;
import utils.MyBatisUtils;

public class Demo3 {
	@Test
	public void getUserList(){
		SqlSession sqlSession = MyBatisUtils.getSqlSession();
		UserDao mapper = sqlSession.getMapper(UserDao.class);
		List<User> userList = mapper.getUserList();
		for (User user : userList) {
			System.out.println(user);
		}
		
	}

}
